package com.system.weirdor;

import com.system.weirdor.www.config.EnvironmentConfig;
import com.system.weirdor.www.listen.ApplicationReadyEventListener;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer {

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {

		System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
		System.out.println("启动www...");

		application.sources(Application.class)

				.listeners(new ApplicationReadyEventListener())

				.profiles(EnvironmentConfig.getActiveProfile());

		return application;

	}

}
